-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move FormControl
styles to PVC
#1638
Conversation
🦋 Changeset detectedLatest commit: 1727564 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@@ -15,6 +15,7 @@ module.exports = { | |||
features: { | |||
'nesting-rules': true, | |||
'focus-visible-pseudo-class': false, | |||
'logical-properties-and-values': false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to disable logical-properties-and-values
to make properties like padding-inline-start
work.
When set to true
, the output adds [dir="ltr"]
+ [dir="rtl"]
to the selector, I assume as a fallback. But we currently don't use these attributes in Lookbook/dotcom.
Still needed for Alpha::AutoComplete
".FormControl-inlineValidation p", | ||
".FormControl-select", | ||
".FormControl-textarea", | ||
".FormControl-input", | ||
".FormControl-input-wrap", | ||
".FormControl-select-wrap", | ||
".FormControl-checkbox-wrap", | ||
".FormControl-radio-wrap" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently all .FormControl
styles are part of Primer::Alpha::TextField
and located at app/components/primer/alpha/text_field.pcss
. But the .FormControl
styles are not just for text fields and also include styles for select, radio, checkbox etc. but it might not be easy to split up?
We could also move .FormControl
to a place where we have styles that get shared across multiple components? Similar to app/lib/primer/css/ that currently get used for utilities.
Co-authored-by: simurai <simurai@users.noreply.github.com>
Description
This is part of #1342 and adds the
FormControl
styles from PCSS. There should be no visual changes.Integration
Yes, the following lines can be removed on dotcom:
- @import '@primer/css/forms/FormControl.scss';
Merge checklist
Added/updated documentationNot sure why the
Primer::Beta::AutoComplete
placeholder text is lighter in the snapshots. Locally they seem to look the same: